package com.hb.trade.client.center;

import com.hb.core.pojo.center.sys.dto.NewsCenterDTO;
import com.hb.core.pojo.parent.PageResult;
import org.fzzn.core.model.msg.Message;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient("hb-center")
public interface NewsCenterClient {
    /**
     *
     * @Description: 分页查询消息中心列表
     * @Author: zhongdl
     * @Date:2022/2/18 11:31
     * @param newsCenterDTO:
     * @return: {@link Message< PageResult< NewsCenterDTO>> }
     **/
    @PostMapping("/newsCenter/pageNewsCenter")
    Message<PageResult<NewsCenterDTO>> pageNewsCenter(@RequestBody NewsCenterDTO newsCenterDTO);

    /**
     *
     * @Description: 新增消息类型
     * @Author: zhongdl
     * @Date:2022/2/18 14:44
     * @param newsCenterDTO:
     * @return: {@link Message< Boolean> }
     **/
    @PostMapping("/newsCenter/insertNewsCenter")
    Message<Boolean> insertNewsCenter(@RequestBody NewsCenterDTO newsCenterDTO);

    /**
     *
     * @Description: 批量标记为已读
     * @Author: zhongdl
     * @Date:2022/2/18 14:58
     * @param newsCenter:
     * @return: {@link Message< Boolean> }
     **/
    @PostMapping("/newsCenter/updateBatchRead")
    Message<Boolean> updateBatchRead(@RequestBody NewsCenterDTO newsCenter);
    /**
     *
     * @Description: 批量删除消息
     * @Author: zhongdl
     * @Date:2022/2/18 15:25
     * @param newsCenter:
     * @return: {@link Message< Boolean> }
     **/
    @PostMapping("/newsCenter/removeBatch")
    Message<Boolean> removeBatch(@RequestBody NewsCenterDTO newsCenter);
    /**
     *
     * @Description: 获得已读和未读的消息个数
     * @Author: zhongdl
     * @Date:2022/2/18 17:07
     * @param newsCenter:
     * @return: {@link Message< NewsCenterDTO> }
     **/
    @PostMapping("/newsCenter/readCount")
    Message<NewsCenterDTO> readCount(@RequestBody NewsCenterDTO newsCenter);
}
